<template>
   <div>
       <el-backtop ></el-backtop>

       <toptitle :name1=this.name1 @numValue="numValue"></toptitle>
       <backTop></backTop>
       <el-carousel indicator-position="outside">
           <el-carousel-item v-for="item in 4" :key="item">
               <h3 class="img">{{ item }}</h3>
           </el-carousel-item>
       </el-carousel>
   </div>
</template>

<script>
    import toptitle from "./components/toptitle";
    import backTop from "./components/backTop";
    export default {
        name: "index",
        data(){
          return{
              name1:"112"
          }
        },
        methods:{
            numValue(data){
                console.log(data)
            }
        },
        components:{
            // eslint-disable-next-line no-undef
            toptitle,
            backTop
        }
    }
</script>

<style scoped>
    .el-carousel__item h3 {
        color: #475669;
        font-size: 18px;
        opacity: 0.75;
        line-height: 300px;
        margin: 0;
    }

    .el-carousel__item:nth-child(2n) {
        background-color: #99a9bf;
    }

    .el-carousel__item:nth-child(2n+1) {
        background-color: #d3dce6;
    }
    .img{
        background-image: url("https://img.alicdn.com/imgextra/i3/6000000001009/O1CN01jeTuGI1JKAMK4WGFm_!!6000000001009-0-octopus.jpg");
        background-repeat: no-repeat;
        background-size: 100% 100%;
    }
</style>